#include <bits/stdc++.h>

using namespace std;

int gen_res(int len, string& tmp, string& input, vector<bool>& visited, set<string>& all_combination)  {
    if (len == input.length()+1) {
        all_combination.insert(tmp);
        return 0;
    }
    for (int i = 0 ; i < input.length(); ++i) {
        if (!visited[i]) {
            visited[i] = true;
            tmp.push_back(input[i]);
            //
            gen_res(len+1, tmp, input, visited, all_combination);
            tmp.pop_back();
            visited[i] = false;
        }
    }
}


int main() {
    string input;
    cin >> input;
    vector<bool> visited(input.length(), false);
    // set<string> all_combination;
    set<pair<string, int>> all_combination;

    // string tmp;
    // gen_res(1, tmp, input, visited, all_combination);

    // cout << all_combination.size();
}